#!/bin/sh

file=$1
if [ "$file" == "" ]; then
	echo "Please input file"
fi

line1=`cat $file | grep "^+" | grep -v "^+++" | wc -l`
line2=`cat $file | grep "^-" | grep -v "^---" | wc -l`
echo "$line1 + $line2" | bc
